<?php $this->load->view('common/head');?>
<?php $this->load->view('common/navbar');?>
<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">专营店基本信息</div>

  <!-- Table -->
  <table class="table table-condensed">
    <tbody>
      <tr>
        <td class="bg-primary col-md-1">所属区：</td>
        <td><?php echo $storeData['region'] ?></td>
      </tr>
      <tr>
        <td class="bg-primary col-md-1">专营店：</td>
        <td><?php echo $storeData['storeName'] ?></td>
      </tr>
      <tr>
        <td class="bg-primary col-md-1">所属双月：</td>
        <td><?php echo $procData['timeUnitStr'] ?></td>
      </tr>
      <tr>
        <td class="bg-primary col-md-1">双月额度：</td>
        <td><?php echo $procData['fixedMoney'] ?></td>
      </tr>
    </tbody>
  </table>
</div>
<form class="form-inline" action="<?php echo $this->input->server('REQUEST_URI'); ?>" name="audit" id="audit" method="post">
<input type="hidden" name="procId" id="procId" value="<?=$procData['id']?>">
<?php $this->load->view('SpecityProject/settleList', $this->viewData); ?>
<?php
if ($isBubao) {
  $this->load->view('SpecitySettleAgain/storeUploadForm', $this->viewData);
}else{
  $this->load->view('SpecitySettle/storeUploadForm', $this->viewData);  
}
?>
<?php $this->load->view('SpecitySettle/settleMoneyDetail', $this->viewData); ?>
<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">结算审核</div>

  <!-- Table -->
  <table class="table table-condensed">
    <tbody>
      <tr>
        <td class="bg-primary col-md-2">审核级别：</td>
        <td><?php echo $this->user['userRoleName'] ?></td>
      </tr>
      <tr>
        <td class="bg-primary col-md-2">结算申请总费用：</td>
        <td><?php echo $isBubao ? $procData['buSettleApply']: $procData['settleApply'] ?></td>
      </tr>
      <tr>
        <td class="bg-primary col-md-2">结算审核总费用：</td>
        <td id="settleAuditBox"><?php echo $procData['settleAudit'] ?></td>
      </tr>
      <tr>
        <td class="bg-primary col-md-2">审核意见：</td>
        <td><textarea style="width: 500px; height: 100px;" class="form-control" rows="3" name="audit[auditDes]" placeholder="审核意见"></textarea></td>
      </tr>
      <tr>
        <td class="text-center" colspan="2">
          <button class="btn btn-default btn-danger" type="button" onclick="ajaxFormSubmit('audit')">提交审核</button>
          <button class="btn btn-default btn-primary" type="button" onclick="window.location.href='<?=$breadcrumb[count($breadcrumb)-2]['url']?>'" role="button">返回</button>
        </td>
      </tr>
    </tbody>
  </table>
</div>
</form>
<?php $this->load->view('common/auditList', $this->viewData); ?>
<script type="text/javascript" src="public/js/commonAudit.js"></script>
<script type="text/javascript">
  $(function(){
    $("#settleAuditBox").html(countMoney('settleAuditRs'));
    $(".settleAuditRs").change(function(){
      $("#settleAuditBox").html(countMoney('settleAuditRs'));
    });
  });
</script>
<?php $this->load->view('common/foot');?>